<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>App 用户分析</title>
        <!-- 引入 jquery    -->
        <script src="jquery.min.js"></script>
        <!-- 引入 echarts.js -->
        <script src="echarts.min.js"></script>
    </head>
    <body>
        <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
        <div id="main" style="width: 600px;height:400px;"></div>
        <script type="text/javascript">
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('main'));
            var data = [{
                name: '所有用户',
                children: [{
                    name: '流失用户',
                    value: 183472,
                }, {
                    name: '存续用户',
                    value: 7161,
                    children: [{
                        name: '回流用户',
                        value: 6546
                    }, {
                        name: '连续活跃用户',
                        value: 524
                    },{
                        name: '新用户',
                        value: 91
                    },{
                        name: '活跃用户',
                        value: 0
                    }
                    ]
                }]
            }];

            var option = {
                    series: {
                        type: 'sunburst',
                        data: data,
                        radius: [0,'90%'],
                        itemStyle: {
                            borderRadius: 7,
                            borderWidth: 2
                        },
                        label: {
                            show: true
                        }
                    }
                };

            myChart.setOption(option)


        </script>
    </body>
</html>